﻿#ifndef USERDIALOG_H
#define USERDIALOG_H

#include <QDialog>
#include "../model/user.h"
#include <QSqlDatabase>
#include "../dbutil.h"
#include <QMessageBox>

namespace Ui {
class UserDialog;
}

class UserDialog : public QDialog
{
    Q_OBJECT

public:
    explicit UserDialog(QWidget *parent = nullptr);
    ~UserDialog();
    void init(User user);
    void initRole();

private:
    Ui::UserDialog *ui;
    User m_user;

private slots:
    void on_cancel();
    void on_submit();
};

#endif // USERDIALOG_H
